package com.masu.knows.portal.dto;

import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * @author 沈传尚
 * @date 2022/3/28
 */
@Data
public class QuestionDTO implements Serializable {
    @NotBlank(message = "标题不能为空")
    @Pattern(regexp = "^.{3,50}$",message = "标题是3到50个字符")
    private String title;

    @NotEmpty(message = "请至少选择一个标签")
    private String[] tagNames={};

    @NotEmpty(message = "请至少选择一个讲师")
    private String[] teacherNicknames={};

    @NotEmpty(message = "内容不能为空")
    private String content;

}
















